﻿using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x02000274 RID: 628
public class CharFemaleClothes : global::CharClothes
{
	// Token: 0x06000F0B RID: 3851 RVA: 0x0006E00C File Offset: 0x0006C20C
	public CharFemaleClothes(global::CharInfo info) : base(info)
	{
		this.femaleFile = (this.chaFile as global::CharFemaleFile);
		this.femaleClothesInfo = (this.clothesInfo as global::CharFileInfoClothesFemale);
		this.femaleStatusInfo = (this.statusInfo as global::CharFileInfoStatusFemale);
	}

	// Token: 0x06000F0C RID: 3852 RVA: 0x0006E048 File Offset: 0x0006C248
	public override bool AddStateKind(int clothKind, string stateType)
	{
		switch ((int)Enum.ToObject(typeof(global::CharDefine.ClothesKindFemale), clothKind))
		{
		case 0:
		case 1:
		{
			base.dictStateType.Remove(0);
			base.dictStateType.Remove(1);
			global::CharFemaleBody charFemaleBody = this.chaInfo.chaBody as global::CharFemaleBody;
			global::ListTypeFbx listTypeFbx = charFemaleBody.infoClothes[0];
			byte b = 2;
			if (listTypeFbx != null)
			{
				b = byte.Parse(listTypeFbx.Etc[0]);
			}
			byte b2 = 2;
			global::ListTypeFbx listTypeFbx2 = charFemaleBody.infoClothes[1];
			if (listTypeFbx2 != null)
			{
				b2 = byte.Parse(listTypeFbx2.Etc[0]);
			}
			if (b2 != 0)
			{
				GameObject referenceInfo = this.chaInfo.GetReferenceInfo(global::CharReference.RefObjKey.S_CTOP_B_DEF);
				if (referenceInfo)
				{
					if (b == 0)
					{
						b2 = 0;
					}
					else if (b == 1 && b2 == 2)
					{
						b2 = 1;
					}
				}
			}
			if (b != 0)
			{
				GameObject referenceInfo2 = this.chaInfo.GetReferenceInfo(global::CharReference.RefObjKey.S_CBOT_T_DEF);
				if (referenceInfo2)
				{
					if (b2 == 0)
					{
						b = 0;
					}
					else if (b2 == 1 && b == 2)
					{
						b = 1;
					}
				}
			}
			this.AddStateKindSub(0, b);
			this.AddStateKindSub(1, b2);
			break;
		}
		case 2:
			base.dictStateType.Remove(2);
			this.AddStateKindSub(2, byte.Parse(stateType));
			break;
		case 3:
			base.dictStateType.Remove(3);
			this.AddStateKindSub(3, byte.Parse(stateType));
			break;
		case 4:
			base.dictStateType.Remove(4);
			base.dictStateType.Remove(5);
			this.AddStateKindSub(4, byte.Parse(stateType));
			this.AddStateKindSub(5, byte.Parse(stateType));
			break;
		case 5:
		case 6:
		{
			base.dictStateType.Remove(6);
			base.dictStateType.Remove(7);
			global::CharFemaleBody charFemaleBody2 = this.chaInfo.chaBody as global::CharFemaleBody;
			global::ListTypeFbx listTypeFbx3 = charFemaleBody2.infoClothes[5];
			byte b3 = 2;
			if (listTypeFbx3 != null)
			{
				b3 = byte.Parse(listTypeFbx3.Etc[0]);
			}
			byte b4 = 2;
			global::ListTypeFbx listTypeFbx4 = charFemaleBody2.infoClothes[6];
			if (listTypeFbx4 != null)
			{
				b4 = byte.Parse(listTypeFbx4.Etc[0]);
			}
			if (b4 != 0)
			{
				GameObject referenceInfo3 = this.chaInfo.GetReferenceInfo(global::CharReference.RefObjKey.S_STOP_B_DEF);
				if (referenceInfo3)
				{
					if (b3 == 0)
					{
						b4 = 0;
					}
					else if (b3 == 1 && b4 == 2)
					{
						b4 = 1;
					}
				}
			}
			if (b3 != 0)
			{
				GameObject referenceInfo4 = this.chaInfo.GetReferenceInfo(global::CharReference.RefObjKey.S_SBOT_T_DEF);
				if (referenceInfo4)
				{
					if (b4 == 0)
					{
						b3 = 0;
					}
					else if (b4 == 1 && b3 == 2)
					{
						b3 = 1;
					}
				}
			}
			this.AddStateKindSub(6, b3);
			this.AddStateKindSub(7, b4);
			break;
		}
		case 7:
			base.dictStateType.Remove(8);
			this.AddStateKindSub(8, byte.Parse(stateType));
			break;
		case 8:
			base.dictStateType.Remove(9);
			this.AddStateKindSub(9, byte.Parse(stateType));
			break;
		case 9:
			base.dictStateType.Remove(10);
			this.AddStateKindSub(10, byte.Parse(stateType));
			break;
		case 10:
			base.dictStateType.Remove(11);
			this.AddStateKindSub(11, byte.Parse(stateType));
			break;
		}
		return true;
	}

	// Token: 0x06000F0D RID: 3853 RVA: 0x0006E3DC File Offset: 0x0006C5DC
	public virtual bool AddStateKindSub(int stateKind, byte type)
	{
		if (!global::MathfEx.RangeEqualOn(0, (int)type, 1))
		{
			return false;
		}
		Dictionary<byte, string> dictionary = new Dictionary<byte, string>();
		if (type == 0)
		{
			dictionary[0] = "着衣";
			dictionary[1] = "半脱";
			dictionary[2] = "脱衣";
		}
		else
		{
			dictionary[0] = "着衣";
			dictionary[2] = "脱衣";
		}
		base.dictStateType[stateKind] = dictionary;
		return true;
	}

	// Token: 0x06000F0E RID: 3854 RVA: 0x0006E454 File Offset: 0x0006C654
	public override void RemoveStateKind(int clothKind)
	{
		switch ((int)Enum.ToObject(typeof(global::CharDefine.ClothesKindFemale), clothKind))
		{
		case 0:
		case 1:
			base.dictStateType.Remove(0);
			base.dictStateType.Remove(1);
			this.AddStateKind(0, string.Empty);
			break;
		case 2:
			base.dictStateType.Remove(2);
			break;
		case 3:
			base.dictStateType.Remove(3);
			break;
		case 4:
			base.dictStateType.Remove(4);
			base.dictStateType.Remove(5);
			break;
		case 5:
		case 6:
			base.dictStateType.Remove(6);
			base.dictStateType.Remove(7);
			this.AddStateKind(5, string.Empty);
			break;
		case 7:
			base.dictStateType.Remove(8);
			break;
		case 8:
			base.dictStateType.Remove(9);
			break;
		case 9:
			base.dictStateType.Remove(10);
			break;
		case 10:
			base.dictStateType.Remove(11);
			break;
		}
	}

	// Token: 0x06000F0F RID: 3855 RVA: 0x0006E59C File Offset: 0x0006C79C
	public override void SetClothesState(int clothesStateKind, byte state)
	{
		while (state <= 2)
		{
			if (!base.IsStateKind(clothesStateKind))
			{
				this.femaleStatusInfo.clothesState[clothesStateKind] = state;
				break;
			}
			if (base.IsStateType(clothesStateKind, state))
			{
				this.femaleStatusInfo.clothesState[clothesStateKind] = state;
				break;
			}
			state += 1;
		}
		if (clothesStateKind != 4)
		{
			if (clothesStateKind == 5)
			{
				if (this.SwimsuitNoSeparate)
				{
					if (this.femaleStatusInfo.clothesState[clothesStateKind] == 2)
					{
						this.femaleStatusInfo.clothesState[4] = 2;
					}
					else if (this.femaleStatusInfo.clothesState[4] == 2)
					{
						this.femaleStatusInfo.clothesState[4] = state;
					}
				}
			}
		}
		else if (this.SwimsuitNoSeparate)
		{
			if (this.femaleStatusInfo.clothesState[clothesStateKind] == 2)
			{
				this.femaleStatusInfo.clothesState[5] = 2;
			}
			else if (this.femaleStatusInfo.clothesState[5] == 2)
			{
				this.femaleStatusInfo.clothesState[5] = state;
			}
		}
	}

	// Token: 0x06000F10 RID: 3856 RVA: 0x0006E6C4 File Offset: 0x0006C8C4
	public override void SetClothesStateAll(byte state)
	{
		int num = Enum.GetNames(typeof(global::CharDefine.ClothesStateKindFemale)).Length;
		for (int i = 0; i < num; i++)
		{
			this.SetClothesState(i, state);
		}
	}

	// Token: 0x06000F11 RID: 3857 RVA: 0x0006E700 File Offset: 0x0006C900
	public override void UpdateClothesStateAll()
	{
		int num = Enum.GetNames(typeof(global::CharDefine.ClothesStateKindFemale)).Length;
		for (int i = 0; i < num; i++)
		{
			this.SetClothesState(i, this.statusInfo.clothesState[i]);
		}
	}

	// Token: 0x06000F12 RID: 3858 RVA: 0x0006E748 File Offset: 0x0006C948
	public virtual bool ChangeClothesColor(int clothKind)
	{
		global::CharReference.TagObjKey[] array = new global::CharReference.TagObjKey[]
		{
			global::CharReference.TagObjKey.ObjCTop,
			global::CharReference.TagObjKey.ObjCBot,
			global::CharReference.TagObjKey.ObjBra,
			global::CharReference.TagObjKey.ObjShorts,
			global::CharReference.TagObjKey.ObjSwim,
			global::CharReference.TagObjKey.ObjSTop,
			global::CharReference.TagObjKey.ObjSBot,
			global::CharReference.TagObjKey.ObjGloves,
			global::CharReference.TagObjKey.ObjPanst,
			global::CharReference.TagObjKey.ObjSocks,
			global::CharReference.TagObjKey.ObjShoes
		};
		List<GameObject> tagInfo = this.chaInfo.GetTagInfo(array[clothKind]);
		global::ColorChange.SetHSColor(tagInfo, this.femaleClothesInfo.clothesColor[clothKind], true, true, this.femaleClothesInfo.clothesColor2[clothKind], true, true);
		return true;
	}

	// Token: 0x04001079 RID: 4217
	public global::CharFemaleFile femaleFile;

	// Token: 0x0400107A RID: 4218
	public global::CharFileInfoClothesFemale femaleClothesInfo;

	// Token: 0x0400107B RID: 4219
	public global::CharFileInfoStatusFemale femaleStatusInfo;

	// Token: 0x0400107C RID: 4220
	public bool NotBra;

	// Token: 0x0400107D RID: 4221
	public bool NotShorts;

	// Token: 0x0400107E RID: 4222
	public bool NotBot;

	// Token: 0x0400107F RID: 4223
	public bool AlwaysNip;

	// Token: 0x04001080 RID: 4224
	public bool SwimsuitNoSeparate;
}
